/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package proms.net.modelo.dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.List;
import proms.net.conexao.Conexao;
import proms.net.modelo.bean.Pericia;

public class PericiaDAO implements InterfacePericiaDAO
{
    private Conexao conexao;

    public void salvarPericia(Pericia pericia) throws SQLException {

        Connection conexao2 = conexao.conecta();
        PreparedStatement ps;

        String sqlInsert2 = "INSERT INTO pericia(cod_processo, hora, data_pericia, perito) VALUES (?,?,?,?);";

        ps = conexao2.prepareStatement(sqlInsert2);

        ps.setInt(1, pericia.getCodProcesso());
        ps.setString(2, pericia.getHora());
        ps.setString(3, pericia.getData());
        ps.setString(4, pericia.getPerito());

        ps.executeUpdate();
	ps.close();
    }

    public void excluirPericia(Integer codigo) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void atualizarPericia(Pericia pericia) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public Pericia getPericia(Integer codigo) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public List<Pericia> getPericias() {
        throw new UnsupportedOperationException("Not supported yet.");
    }


}
